package com.rbac.admin.vo.system;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户视图对象
 *
 * @author rbac-admin
 * @since 2024-07-18
 */
@Data
@Schema(description = "用户视图对象")
public class UserVO {
    
    @Schema(description = "用户ID")
    private String id;
    
    @Schema(description = "用户名")
    private String username;
    
    @Schema(description = "昵称")
    private String nickname;
    
    @Schema(description = "头像")
    private String avatar;
    
    @Schema(description = "性别：0-未知，1-男，2-女")
    private Integer sex;
    
    @Schema(description = "邮箱")
    private String email;
    
    @Schema(description = "手机号")
    private String phone;
    
    @Schema(description = "状态：0-禁用，1-正常")
    private Integer status;
    
    @Schema(description = "主部门ID")
    private Integer mainDeptId;
    
    @Schema(description = "主部门名称")
    private String deptName;
    
    @Schema(description = "用户所属的所有部门")
    private List<DeptVO> depts;
    
    @Schema(description = "用户拥有的角色")
    private List<RoleVO> roles;
    
    @Schema(description = "用户拥有的权限")
    private List<String> permissions;
    
    @Schema(description = "创建者")
    private String createBy;
    
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    
    @Schema(description = "更新者")
    private String updateBy;
    
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    
    @Schema(description = "备注")
    private String remark;
}